import 'package:flutter/material.dart';

/// Create： Zhang 4/21/21 4:12 PM
/// 描述：定义项目中文字的通用样式

///通用文字
Container commonText(
  String text, {
  Color color: const Color(0xff4F4F4F),
  double fontSize: 14,
  EdgeInsetsGeometry? padding,
  EdgeInsetsGeometry? margin,
  FontWeight? fontWeight,
  AlignmentGeometry? alignment,
  Color bgColor = Colors.transparent,
  double bgBorderRadius = 0,
  double? width,
  double? height,
  Color? borderColor,
  double borderWidth = 1,
}) =>
    Container(
      width: width,
      height: height,
      alignment: alignment,
      margin: margin,
      padding: padding,
      decoration: BoxDecoration(
        color: bgColor,
        borderRadius: BorderRadius.circular(bgBorderRadius),
        border: borderColor == null
            ? null
            : Border.all(
                color: borderColor,
                width: borderWidth,
              ),
      ),
      child: Padding(
        padding: EdgeInsets.only(bottom: 2),
        child: Text(
          text,
          style: TextStyle(
            fontSize: fontSize,
            color: color,
            fontWeight: fontWeight,
          ),
        ),
      ),
    );
